<?session_start();?>
<html>
	<head>
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>
	<link type="text/css" href="css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />	
	<link type="text/css" href="css/date.css" rel="stylesheet" />	
	<script type="text/javascript">
	var details;
	unit="B7";
	function sendRequest(){
		amount=$("#amount").val();
		mode=$("#mode").val();
		date_received=$("#date_received").val();
		receipt_no=$("#receipt_no").val();
		message=$("#message").val();
		$("#requestForm").html("<img src='gifs/indicator.gif' />");
		
		$.post('controllers/RequestUpdatePaymentController.php',{ 
		amount: amount, 
		mode: mode, 
		date_received: date_received, 
		receipt_no: receipt_no, 
		message: message, 
		}, function(data) {
		  details=data;
			displayRequestDetails();
		});
	}
	function displayRequestDetails(){
		$("#requestForm").html(details);
	}
	

	</script>
	</head>
	<body>
		<div id="requestForm">
		<h2>Request Update of Payment</h2>
				Amount: <input type="text" id="amount" /><br />
				Mode of Payment: 
				<select id="mode">
					<option>Bank</option>
					<option>Personal</option>
				</select><br />
				Date Received: <input type="text" id="date_received" /><br />
								 <script type="text/javascript">
					$(function() {
						$("#date_received").datepicker({ dateFormat: 'D, MM dd, yy' });
					});
				</script>
				Receipt Number (if applicable): <input type="text" id="receipt_no" /><br />
				Short message for the management: <br /><textarea id="message">Enter short message here.</textarea><br />
				<input type="button" value="Send Request" onclick="sendRequest();return false;" />
		</div>
	</body>
</html>